1. Technical Field
The present invention relates to a communication apparatus and a communication method that are capable of searching for a route suitable to a data type used in communication to be started, and more particularly, to a communication apparatus and a communication method that are capable of, when a source apparatus requesting communication cannot directly communicate with a destination apparatus that is a destination of the communication, searching for a route on which the source apparatus communicates with the destination apparatus by multihop.
2. Background Art
Conventionally, the following method has been known as a method of searching for a route from a source apparatus to a destination apparatus when the source apparatus cannot directly communicate with the destination apparatus.
First, a source apparatus broadcasts a route request packet which specifies a destination apparatus. A communication apparatus which has received the route request packet broadcasted by another communication apparatus determines whether or not the destination apparatus specified by the received route request packet is the communication apparatus which has received the route request packet. If it is determined that the destination apparatus is not the communication apparatus which has been received the route request packet, the communication apparatus adds, to the route request packet, information indicating that the route request packet has passed through the communication apparatus, and broadcasts the resultant route request packet.
Thus, a received route request packet is repeatedly broadcasted by communication apparatuses other than the destination apparatus, and thereby the route request packet finally arrives at the destination apparatus. The route request packet received by the destination apparatus at this time includes information indicating all relay apparatuses through which the route request packet has passed from the source apparatus to the destination apparatus. The destination apparatus sets a route, based on the information indicating the relay apparatuses.
However, in the case where a communication apparatus which has received route request packets broadcasts all the received route request packets, the following problem arises.
Normally, a route request packet broadcasted by the source apparatus or a relay apparatus is received by a plurality of communication apparatuses which can directly communicate with the communication apparatus which has transmitted the route request packet. If the plurality of communication apparatuses which have received the route request packet are not the destination apparatus, each of the plurality of communication apparatuses broadcasts the route request packet. Therefore, every time one route request packet is transmitted, the route request packets whose number is the same as the number of relay apparatuses which directly receive the route request packet, are broadcasted.
Thus, in the case where an apparatus which has received route request packets broadcasts all the received route request packets, the number of next route request packets to be transmitted increases every time a route request packet is transmitted. As a result, the increased number of route request packets compresses a bandwidth used for data communication, and data communication between other apparatuses is hindered.
One of techniques intended to solve such a problem is a technique in which: a route evaluation value of a route through which a route request packet has passed is written on the route request packet; and route request packets to be broadcasted by a relay apparatus are restricted based on the route evaluation value (for example, Patent Document 1). Here, the route evaluation value indicates, for example, the length of a time period during which a state of connection being established is kept on the route, or a throughput expected when communication is performed on the route.
Hereinafter, processing in the technique of Patent Document 1 performed when a relay apparatus has received a route request packet upon searching for a route, will be described.
Every time a relay apparatus receives a route request packet, the relay apparatus calculates a route evaluation value from a state of a route through which the route request packet has passed. When a relay apparatus has received the route request packet for the first time, the relay apparatus directly broadcasts the route request packet. On the other hand, when the relay apparatus has received the route request packet for the second or subsequent time, which route request packet has passed through a route different from the route through which the route request packet received for the first time has passed, that is, when the relay apparatus has duplicately received the route request packet, the relay apparatus compares a route evaluation value of the route request packet which has been already broadcasted, with a route evaluation value of the duplicately received route request packet. If the route evaluation value of the duplicately received route request packet is higher than the route evaluation value of the route request packet which has been already transmitted, the relay apparatus broadcasts the duplicately received route request packet. On the other hand, if the route evaluation value of the duplicately received route request packet is lower than the route evaluation value of the route request packet which has been already transmitted, the relay apparatus discards the duplicately received route request packet without broadcasting the duplicately received route request packet.